package com.acmen.easyapi.factory.impl;

import com.acmen.easyapi.annotation.ReqParam;
import com.acmen.easyapi.factory.ReqParamFactory;
import org.springframework.stereotype.Component;

import java.lang.reflect.Field;
import java.util.Arrays;
import java.util.List;

/**
 * @author acmen
 * 默认请求参数工厂实现类
 */
@Component
public class DefaultReqParamFactory implements ReqParamFactory {
    /**
     * 主键ID
     */
    @ReqParam(label = "主键ID")
    private String id;

    @Override
    public List<Field> getReqParamFields() {
        Field[] files = DefaultReqParamFactory.class.getDeclaredFields();
        return Arrays.asList(files);
    }
}
